<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title>设备控制页面</title>
    <style>
      body {
        font-family: Arial, sans-serif;
        background-color: #f2f2f2;
        margin: 0;
        padding: 0;
      }
      .container {
        max-width: 800px;
        margin: 20px auto;
        background-color: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 20px;
      }
      h1 {
        color: #333;
        text-align: center;
      }
      .input-field {
        margin-top: 20px;
        width: 100%;
      }
      .input-field input {
        width: 100%;
        padding: 8px;
        border-radius: 4px;
        border: 1px solid #ccc;
        box-sizing: border-box;
      }
      .status-display {
        margin-top: 20px;
      }
      .status-display .status {
        display: inline-block;
        padding: 8px 16px;
        background-color: #4caf50;
        color: #fff;
        border-radius: 4px;
      }
      .status-display .status.off {
        background-color: #ccc;
      }
      .toggle-button {
        display: inline-block;
        padding: 8px 16px;
        margin-left: 1%;
        background-color: #4caf50;
        color: #fff;
        text-decoration: none;
        border-radius: 4px;
        transition: background-color 0.3s;
        margin-right: 10px;
      }
      .toggle-button.off {
        background-color: #ccc;
      }
      .switch-container {
        margin-top: 20px;
      }
      .slider {
        position: relative;
        width: 60px;
        height: 34px;
      }
      .slider input {
        opacity: 0;
        width: 0;
        height: 0;
      }
      .slider .slider-btn {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        border-radius: 34px;
        transition: 0.4s;
      }
      .slider .slider-btn:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        border-radius: 50%;
        transition: 0.4s;
      }
      input:checked + .slider .slider-btn {
        background-color: #4caf50;
      }
      input:checked + .slider .slider-btn:before {
        transform: translateX(26px);
      }
      .switch-container {
        margin-top: 20px;
      }

      .switch-container {
        margin-top: 20px;
      }
      .iphone-switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 24px;
        background-color: #ccc;
        border-radius: 12px;
        margin-right: 10px;
        cursor: pointer;
      }
      .iphone-switch input {
        display: none;
      }
      .iphone-switch .slider {
        position: absolute;
        top: 2px;
        left: 2px;
        width: 20px;
        height: 20px;
        background-color: #ffffff;
        border-radius: 50%;
        transition: 0.4s;
      }
      .iphone-switch input:checked + .slider {
        background-color: #4caf50;
        transform: translateX(26px);
      }
      .iphone-switch .slider:before {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        background-color: #fff;
        border-radius: 50%;
        transition: 0.4s;
      }
      .time-picker {
        display: inline-block;
        position: relative;
        font-family: Arial, sans-serif;
      }

      .time-picker input[type="time"] {
        appearance: none;
        -webkit-appearance: none;
        border: none;
        font-size: 16px;
        padding: 6px 10px;
        border-radius: 5px;
        background-color: #7fca81;
        color: #000;
        outline: none;
        cursor: pointer;
      }

      .time-picker input[type="time"]::-webkit-inner-spin-button,
      .time-picker input[type="time"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }

      .time-picker input[type="time"]:focus {
        background-color: #e1ffca;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
      }
    </style>
  </head>
  <body>
    <div class="container">
      <h1>设备控制</h1>
      <div class="input-field">
        <h2>输入框</h2>
        <div style="display: flex">
          <input
            type="text"
            placeholder="input the blinker auth"
            id="inputbox"
          />
          <a href="#" class="toggle-button" id="button-submit">submit</a>
        </div>
        <h2>设置时间</h2>

        <label style="font-weight: bolder" for="myTimePicker"
          >设置每日重启时间:</label
        >
        <div class="time-picker">
          <input type="time" id="myTimePicker" />
        </div>
        <br /><br />
        <label style="font-weight: bolder" for="myTimePicker1"
          >设置自动开灯时间:</label
        >
        <div class="time-picker">
          <input type="time" id="myTimePicker1" />
        </div>
        <br /><br />
        <label style="font-weight: bolder" for="myTimePicker2"
          >设置自动关灯时间:</label
        >
        <div class="time-picker">
          <input type="time" id="myTimePicker2" />
        </div>

        <!-- <input type="text" placeholder="输入每日重启时间"> -->
      </div>
      <div class="status-display">
        <h2>状态显示框</h2>
        <div class="status" id="status1">状态1</div>
        <br /><br />
        <div class="status" id="status2">状态2</div>
      </div>
      <div>
        <h2>总开关</h2>
        <a href="#" class="toggle-button" id="button-yard">院灯</a>
        <a href="#" class="toggle-button" id="button-living">外间</a>
        <a href="#" class="toggle-button" id="button-bed">里间</a>
        <br /><br />
        <a href="#" class="toggle-button" id="button-auto">自动开关灯</a>
        <a href="#" class="toggle-button" id="button-reset">即刻复位</a>
      </div>
      <div class="switch-container">
        <h2>允许其他用户管理</h2>
        <label class="iphone-switch">
          <input type="checkbox" id="button-admit" />
          <span class="slider"></span>
        </label>
      </div>

      <div class="switch-container">
        <h2>定时重启</h2>
        <label class="iphone-switch">
          <input type="checkbox" id="button-auto-rst" />
          <span class="slider"></span>
        </label>
      </div>
    </div>

    <script src="manage.js"></script>
  </body>
</html>
